<script setup lang="ts">

import { ref } from 'vue';
import SonCom from '../components/SonCom.vue';

const fName = ref('jack')
// const fAge = ref(10)
// const fMale = ref(false)
const fMoney = ref(10)

const sonCall = (moneyNum: number) => {
    console.log('儿子要的钱：' + moneyNum)
}
</script>

<template>
<h2>我是父组件</h2>
<!-- 父组件传递数据 -->
<SonCom :name="fName" :money="fMoney" @change-money="sonCall"></SonCom>
</template>

<style scoped>

</style>
